package cn.wolfcode.crm.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.json.MappingJackson2JsonView;

import java.util.HashMap;
import java.util.Map;

@Controller
public class JsonController {
    @RequestMapping("/json")
    public ModelAndView json(){
        MappingJackson2JsonView mappingJackson2JsonView = new MappingJackson2JsonView();
        Map<String,Object> map=new HashMap();
        map.put("scccess",true);
        return new ModelAndView(mappingJackson2JsonView,map);
    }
}
